ContentType

public interface ContentType

A parsed Content-Type header value.

Since

7.33

Types

Link copied to clipboard
public final class Builder
A builder of ContentType.

Properties

Link copied to clipboard
public final String boundary
public final String boundary

The boundary specified in this ContentType, if any.

Link copied to clipboard
public final Charset charset
public final Charset charset

The charset specified in this ContentType, if any.

Functions

Link copied to clipboard
Returns the boundary specified in the Content-Type header or an empty Optional if the header does not contain a boundary.
Link copied to clipboard
Returns the charset specified in the Content-Type header or an empty Optional if the header does not contain a charset.
Link copied to clipboard
public String mediaType()
Returns the media type (the MIME type) specified in the Content-Type header.
Link copied to clipboard
public static ContentType.Builder newBuilder(String mediaType)
Create a new ContentType builder.